//
//  KBVisitorViewController.swift
//  VVeibo110
//
//  Created by kongbin on 16/8/9.
//  Copyright © 2016年 kongbin. All rights reserved.
//

import UIKit

class KBVisitorViewController: UIViewController {

    var isLogin :Bool = false
    
    
    
    //访客视图
    var visitorView :KBVisitor?
    
    override func loadView() {
        
        if isLogin{
            super.loadView()
            
        }else{
        setupVisitor()
        
        }
        
    }
    
    //设置访客视图
    func setupVisitor(){
        setupNav()

        visitorView = KBVisitor()
        
        view = visitorView
    
        
    }
  //设置导航
    func setupNav() {
navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action: "loginClick")
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", style: UIBarButtonItemStyle.Plain, target: self, action: "loginClick")
    }
    
    func loginClick(){
    
 print("点击了按钮")
    
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
}
